package com.ym.medical.domain.param;

import com.ym.common.constant.BeanCovert;
import com.ym.medical.domain.entity.SysConfigEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

import static com.ym.common.constant.ValidRule.Add;
import static com.ym.common.constant.ValidRule.Update;

/**
 * 系统参数配置对象 sys_config
 *
 * @author ym
 * @date 2020-08-18
 */
@ApiModel("系统参数配置-修改")
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
public class SysConfigUpdateParam extends BeanCovert<SysConfigEntity> {

    @ApiModelProperty("主键")
    @NotNull(message = "主键不能为空", groups = {Add.class, Update.class})
    private Long id;

    @ApiModelProperty("配置名称")
    @Size(max = 64, message = "配置名称长度超过{max}", groups = {Add.class, Update.class})
    private String name;

    @ApiModelProperty("配置键名")
    @Size(max = 32, message = "配置键名长度超过{max}", groups = {Add.class, Update.class})
    private String theKey;

    @ApiModelProperty("参数键值")
    @Size(max = 64, message = "参数键值长度超过{max}", groups = {Add.class, Update.class})
    private String theValue;

    @ApiModelProperty("是否系统内置")
    @Size(max = 2, message = "是否系统内置长度超过{max}", groups = {Add.class, Update.class})
    private String theType;

    @ApiModelProperty("备注")
    @Size(max = 500, message = "备注长度超过{max}", groups = {Add.class, Update.class})
    private String remark;

}
